<!--  -->
<template>
	<div class="return-close">
		<van-nav-bar :border="false" :left-arrow="left_arrow" @click-left="onClickLeft" @click-right="onClickRight">
			<template #right v-if="right_close">
				<van-icon name="cross" size=".410628rem" />
			</template>
		</van-nav-bar>
	</div>
</template>

<script>
export default {
	name: 'index',
	props: {
		left_arrow: {
			//左返回
			type: Boolean,
			default: false,
		},
		right_close: {
			//右关闭
			type: Boolean,
			default: false,
		},
	},
	data() {
		return {};
	},
	components: {},
	computed: {},
	mounted() {},
	methods: {
		onClickLeft() {
			this.$router.go(-1); //返回上页
		},
		onClickRight() {
			this.$router.push('/'); //返回首页
		},
	},
};
</script>
<style lang='scss' scoped>
.return-close .van-nav-bar ::v-deep .van-icon {
	color: black;
}
</style>